import  numpy as np
from numpy import*

arr_a = np.array([[1, 0], [1, 1]])
arr_b = np.array([[2, 2], [2, 2]])
print(np.dot(arr_a, arr_b))       #np.dot()表示矩阵乘积
'''
[[2 2]
 [4 4]]
'''
print(np.multiply(arr_a, arr_b))  #  np.multiply() 或（*）号表示点乘，*慎用
'''
[[2 0]
 [2 2]]
'''
print(arr_a*arr_b)
'''
[[2 0]
 [2 2]]
'''

print('-'*50)
a = np.mat([[1, 1], [1, 1]])
b = np.mat([[2, 2], [2, 2]])
print(np.dot(a, b))
'''
[[4 4]
 [4 4]]
'''
print(a*b)
'''
[[4 4]
 [4 4]]
'''
print(np.multiply(a, b))
'''
[[2 2]
 [2 2]]
'''


